package com.settlement.system.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.settlement.system.common.base.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
        import java.math.BigDecimal;
        import java.time.LocalDateTime;

/**
* <p>
* 抖音结算单
* </p>
*
* @author huangrensen
* @since 2024-05-30
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class DyBill extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
    * ID
    */
    @TableId(value = "id")
    private String id;


    /**
    * 店铺ID
    */
    private Long storeId;
    @TableField(exist = false)
    private String storeName;


    /**
    * 结算时间
    */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime settlementTime;


    /**
    * 订单号
    */
    private String orderNo;


    /**
    * 子订单号
    */
    private String subOrderNo;


    /**
    * 结算金额
    */
    private BigDecimal settlementPrice = BigDecimal.ZERO;


    /**
    * 结算账户
    */
    private String settlementAccount;


    /**
    * 结算单类型
    */
    private String settlementType;


    /**
    * 有结算前退款
    */
    private String settlementRefund;


    /**
    * 下单时间
    */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime orderTime;


    /**
    * 商品ID
    */
    private String productId;


    /**
    * 商品数量
    */
    private Integer quantity;


    /**
    * 业务类型
    */
    private String businessType;


    /**
    * 订单类型
    */
    private String orderType;


    /**
    * 订单总价
    */
    private BigDecimal orderAmount = BigDecimal.ZERO;


    /**
    * 商品总价
    */
    private BigDecimal productAmount = BigDecimal.ZERO;


    /**
    * 运费
    */
    private BigDecimal transportFee = BigDecimal.ZERO;


    /**
    * 店铺劵
    */
    private BigDecimal preferential = BigDecimal.ZERO;


    /**
    * 结算前退款金额
    */
    private BigDecimal settlementRefundAmount = BigDecimal.ZERO;


    /**
    * 平台补贴
    */
    private BigDecimal preformSubsidy = BigDecimal.ZERO;


    /**
    * 达人补贴
    */
    private BigDecimal drSubsidy = BigDecimal.ZERO;


    /**
    * 抖音支付补贴
    */
    private BigDecimal dySubsidy = BigDecimal.ZERO;


    /**
    * 抖音月付营销补贴
    */
    private BigDecimal dyMonthSubsidy = BigDecimal.ZERO;


    /**
    * 银行补贴
    */
    private BigDecimal bankSubsidy = BigDecimal.ZERO;


    /**
    * 以旧换新抵扣
    */
    private BigDecimal deduction = BigDecimal.ZERO;


    /**
    * 平台补贴运费
    */
    private BigDecimal platformSubsidyFee = BigDecimal.ZERO;


    /**
    * 用户实付
    */
    private BigDecimal buyAmount = BigDecimal.ZERO;


    /**
    * 收入合计
    */
    private BigDecimal reiceveAmount = BigDecimal.ZERO;


    /**
    * 平台服务费
    */
    private BigDecimal serviceAmount = BigDecimal.ZERO;


    /**
    * 达人佣金
    */
    private BigDecimal commission = BigDecimal.ZERO;


    /**
    * 服务商佣金
    */
    private BigDecimal carrierCommission = BigDecimal.ZERO;


    /**
    * 渠道分成
    */
    private BigDecimal channelFee = BigDecimal.ZERO;


    /**
    * 招商服务费
    */
    private BigDecimal investmentServiceFee = BigDecimal.ZERO;


    /**
    * 站外推广费
    */
    private BigDecimal promotionFee = BigDecimal.ZERO;


    /**
    * 其他分成
    */
    private BigDecimal otherFee = BigDecimal.ZERO;


    /**
    * 其他分成说明
    */
    private String otherFeeRemark;


    /**
    * 支出合计
    */
    private BigDecimal payAmount = BigDecimal.ZERO;


    /**
    * 是否免佣
    */
    private String noCommission;


    /**
    * 免佣金额
    */
    private BigDecimal noCommissionAmount = BigDecimal.ZERO;


    /**
    * 备注
    */
    private String remark;

    @TableField(exist = false)
    private String billMonth;
    @TableField(exist = false)
    private String tableName;

}
